package com.leaf.lowcode.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.leaf.lowcode.entity.HkVistor;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author cxd
 * @since 2021-11-02
 */
public interface HkVisitorMapper extends BaseMapper<HkVistor> {
    @Select("select * from hk_visit where orderId = #{orderId}")
    HkVistor selectId(String orderId);

    @Select("select count(*) from hk_visit")
    int selectSum();

    @Select("SELECT COUNT(*),DATE_FORMAT(`visitStartTime`,'%j') dayint FROM hk_visit GROUP BY dayint")
    public List<String> sumElectricityProduction();



}
